//
//  ViewController.m
//  ZYThirdShare_OC
//
//  Created by 石志愿 on 2021/1/11.
//

#import "ViewController.h"
#import "ZYShareConstans.h"
#import "ZYShareAlertView.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (IBAction)shaerAction:(UIButton *)sender {
    ZYThirdShareInfo *info = [[ZYThirdShareInfo alloc]init];
    info.url = @"https://www.baidu.com";
    info.icon = [UIImage imageNamed:@""];
    info.title = @"分享测试";
    info.desc = @"这个一个链接";
    ZYShareAlertView *alertView = [[ZYShareAlertView alloc]init];
    alertView.shareInfo = info;
    [alertView presentToWindow];
    alertView.completion = ^{
        [ZYNetworkManager shareLive:self.detailInfo.modelId.integerValue];
        self.detailInfo.forwardNumber += 1;
        self.footerView.isPoll = NO;
        self.footerView.info = self.detailInfo;
    };
}

@end
